package net.huashitong.taskGroup.databean;

public enum MessageHeaders {
    projectName("projectName","消息名称"),
    type("type","类别"),
    resDept("resDept","收件单位"),
    recipients("recipients","收件人"),
    phone("phone","电话号码"),
    text("text","短信内容"),
    createDate("createDate","日期"),
    createTime("createTime","时间")
    ;
    private String code;
    private String value;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    MessageHeaders(String code, String value) {
        this.code = code;
        this.value = value;
    }

    public static MessageHeaders getValues(String code)
    {
        for (MessageHeaders item:values())
        {
            if(item.getCode().equals(code))
            {
                return item;
            }
        }
        return  null;
    }
}
